import 'package:basic_common/common_exports.dart';
import 'package:basic_widgets/app_bar_widget.dart';
import 'package:basic_widgets/custom_step_widget.dart';
import 'package:basic_widgets/text_widget.dart';
import 'realname_controller.dart';
import 'view/authen_view.dart';
import 'view/identity_view.dart';
import 'view/realname_view.dart';

/// 实名认证
class RealNamePage extends GetView<RealNameController> {
  const RealNamePage({super.key});

  @override
  Widget build(BuildContext context) {
 Get.lazyPut(() => RealNameController(),);
    return Scaffold(
        resizeToAvoidBottomInset: true,
        appBar: backAppbar(title: "医生认证"),
        body: ListView(children: [
          topTipWidget(),
          Container(
              color: Colors.white,
              padding: EdgeInsets.only(top: ScreenHelper.height(15)),
              child: Obx(() => StepsWidget(
                    currentIndex: controller.currentStep.value,
                    titles: controller.titles,
                  ))),
          Obx(() => Offstage(
              offstage: controller.currentStep.value != 0,
              child: const RealNameView())),
          // IdentityView()
          Obx(() => Offstage(
              offstage: controller.currentStep.value != 1,
              child: IdentityView())),
          Obx(() => Offstage(
              offstage: controller.currentStep.value != 2, child: AuthenView()))
          // AuthenView()
        ]));
  }
}
